<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<title>listvideo</title>
  <link rel="stylesheet" href="./assets/css/bootstrap.min.css">
</head>
<body>
<h6><a href="admin.php?c=user&m=menu">返回menu </a><h6>
<center><h2>视频列表(共有<?php  echo count($data['video']);?> 个视频)</h2></center>
<div class="col-md-12" >
<table class="table table-hover" >
	<tr>
		<th>序号</th>
		<th>视频名称</th>
		<th>类型</th>
		<th>添加时间</th>
		<th>海报</th>
    <th>操作</th>
		</tr>
	<?php 
       foreach ($data['video'] as $row ) {
      ?>

      <tr>
      	<td><?php echo $row['vid'];?></td>
      	<td><?php echo $row['videoname'];?></td>
      	

      	<td><?php 
          switch ($row['typename'])
{     case '1': echo "电影 ";
      break;
      case '2': echo  "电视剧";
      break;
      case '3': echo "话剧";
      break;
      case '4': echo "音乐剧";
      break;
        default :
          echo "未选择类型";
          break;
}?>
  <td><?php echo $row['uploaddate'];?></td>
        

      	<td><img  src="./poster/<?php  echo  $row['pic'];?>" width="80" height="80" alt="海报" title="<?php echo $row['intro'];?>" ></td>
      	<td><a href="admin.php?c=video&m=editvideo&vid=<?php echo $row['vid'];?>">修改</a>|<a href="admin.php?c=video&m=delvideo&vid=<?php echo $row['vid'];?>">  删除</a></td>
      </tr>
      <?php     
       }
	?>
</table>
</div>

</body>
</html>